<template>
    <ul class="m-menulist">
        <li v-for="(item,index) in navMenu" :key="index" @click="toClasspage(item.url)">
            <img :src="banner_url+item.icon" alt="">
            <p>{{item.name}}</p>
        </li>
    </ul>
</template>
<script>
export default {
    name:'',
    props:['navMenu'],
    data () {
        return  {
            // navMenu:[{
            //     icon: require('@/assets/images/Plastic_project.png'),
            //     text:'整形项目',
            //     url:'projectList'
            // }, {
            //     icon: require('@/assets/images/product_classification.png'),
            //     text: '产品分类',
            //     url: 'classPage'
            // }, {
            //     icon: require('@/assets/images/Card_item.png'),
            //     text: '卡项分类',
            //     url: 'classPage'
            // }, {
            //     icon: require('@/assets/images/Circle_Friends.png'),
            //     text: '案例中心',
            //     url: 'friendCircle'
            // }],
            banner_url:process.env.API_HOST,
        }
    },
    methods: {
        toClasspage(url) {
            this.$router.push({name:url})
        }
    },
    mounted() {
        
        console.log(this.navMenu)
    }
}
</script>

<style lang="less" scoped>
.m-menulist{
    .flex;
    background: white;
    padding: 1rem 0;
    li{
        text-align: center;
        flex:1;
        img{
            width: 70%;
        }
        p{
            color: @secondary-gray;
            font-size: 0.9rem;
        }
    }
}
</style>


